#pragma once
#include "../../SGD Wrappers/SGD_Geometry.h"

class Frame
{
public:
	Frame(SGD::Point anchor = {}, SGD::Rectangle draw = {}, SGD::Rectangle coll = {}, float curTime = 0, float maxTime = 0, int soundID = -1, bool flipped = false);
	~Frame();

	// Accessors
	bool IsFlipped();
	SGD::Rectangle GetDrawRect()const;
	SGD::Point GetAnchorPoint()const;
	SGD::Rectangle GetCollisionRect(SGD::Point position);
	SGD::Point GetDestDrawPoint(SGD::Point position) const;
	float GetCurrentTime();
	float GetMaxTime();
	int GetSoundID();
	float GetCollisionTop();
	float GetCollisionRight();
	float GetCollisionLeft();

	// Mutators
	void IsFlipped(bool flipped);
	void SetDrawRect(SGD::Rectangle draw);
	void SetReverseDrawRect(SGD::Rectangle draw);
	void SetCollisionRect(SGD::Rectangle coll);
	void SetReverseCollisionRect(SGD::Rectangle coll);
	void SetAnchorPoint(SGD::Point anchor);
	void SetCurrentTime(float curTime);
	void SetMaxTime(float maxTime);
	void SetSoundID(int soundID);

private:
	SGD::Rectangle drawRect;
	SGD::Rectangle collRect;
	SGD::Point anchorPoint;
	float fDrawLeft;
	float fDrawTop;
	float fCollLeft;
	float fCollTop;
	float fCollRight;
	float fCollBottom;
	float fCurTime;
	float fMaxTime;
	bool bFlipped;
	int iSoundID = -1;
};

